import { connect } from "react-redux";

import Main from "../component/Main.jsx";

import { realtimeConnect, realtimeMessage } from "../action/realtime";

export default connect(
    (state) => ({
        subscribe: state.getIn(["realtime", "subscribe"]),
        unSubscribe: state.getIn(["realtime", "unSubscribe"])
    }), (dispatch) => ({
        setConnect: (status) => dispatch(realtimeConnect(status)),
        setMessage: (message) => dispatch(realtimeMessage(message))
    }))(Main);